import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    sortListUrl: '',
    OrderName: '',
    toDetails: '',
    name: ''
  },
  mutations: {
    emit(state, url) {
      state.sortListUrl = url
    },
    OrderName(state, names) {
      state.OrderName = names
      console.log(names, state.OrderName)
    },
    toDetails(state, item) {
      state.toDetails = item
    },
    name(state, item) {
      state.name = item
    }
  },
  actions: {},
  modules: {}
})